package Homework2;

import java.util.Scanner;

public class Homework2_8 {
    public static void main(String[] args) {
        Scanner input = new Scanner(System.in);
        int n = input.nextInt();
        int sum = PrimeSum.primeSum(n);
        System.out.println(sum);
    }
}
